Background: The benzoxazinoids 2,4-dihydroxy-1,4-benzoxazin-3-one (DIBOA) and 2,4-dihydroxy-7- methoxy-1,4-benzoxazin-3-one (DIMBOA), are key defense compounds present in major agricultural crops such as maize and wheat. Their biosynthesis involves nine enzymes thought to form a linear pathway leading to the storage of DI(M)BOA as glucoside conjugates. Seven of the genes (Bx1-Bx6 and Bx8) form a cluster at the tip of the short arm of maize chromosome 4 that includes four P450 genes (Bx2-5) belonging to the same CYP71C subfamily. The origin of this cluster is unknown. Results: We show that the pathway appeared following several duplications of the TSA gene (α-subunit of tryptophan synthase) and of a Bx2-like ancestral CYP71C gene and the recruitment of Bx8 before the radiation of Poaceae. The origins of Bx6 and Bx7 remain unclear. We demonstrate that the Bx2-like CYP71C ancestor was not committed to the benzoxazinoid pathway and that after duplications the Bx2-Bx5 genes were under positive selection on a few sites and underwent functional divergence, leading to the current specific biochemical properties of the enzymes. The absence of synteny between available Poaceae genomes involving the Bx gene regions is in contrast with the conserved synteny in the TSA gene region. Conclusions: These results demonstrate that rearrangements following duplications of an IGL/TSA gene and of a CYP71C gene probably resulted in the clustering of the new copies (Bx1 and Bx2) at the tip of a chromosome in an ancestor of grasses. Clustering favored cosegregation and tip chromosomal location favored gene rearrangements that allowed the further recruitment of genes to the pathway. These events, a founding event and elongation events, may have been the key to the subsequent evolution of the benzoxazinoid biosynthetic cluster.